﻿<%@ Page Language="C#" MasterPageFile="~/admin/managemain.Master" AutoEventWireup="true" CodeBehind="lines_manage.aspx.cs" Inherits="uswinweb.admin.lines_manage" %>
<%@ Register TagPrefix="win" TagName="linesList" Src="~/datacontrol/linesList.ascx" %>
<%@ Register TagPrefix="win" TagName="pop_complist" Src="~/datacontrol/pop_complist.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headcontent" runat="server">
<script src="../js/jquery-choose.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="maincontent" runat="server">
    <input type="button" id="reclick" name="reclick" onclick="reclcik()" style="display: none" />
    <div class="cot">
        <table cellpadding="0" cellspacing="0" border="0" class="adtb">
				<tbody>
					<tr>
                    <td width="10%">报价公司：</td>
                    <td width="30%">
                    <div class="zi2 popxg" style="z-index:100" >
					<p class="ip1" id="comp_hidd_mino"></p>
                    <input type="hidden" id="comp_hidd_luffy" name="comp_hidd_luffy" value="0" />
					<span class="an"></span>
					<div class="cn" style="width:300px;"  id="comp_hidd_div">
						<div id="showdata2">
                        <win:pop_complist runat="server" ID="pop_complist1" />
                        </div>
					</div>
				    </div>
                    </td>
                    <td width="30%">                    全部<input type="radio" name="status" id="status3" value="-1" checked="checked" />
                    有效<input type="radio" name="status" id="status1" value="1" />
                    无效<input type="radio" name="status" id="status2" value="0" />
                    <input name="" class="soso" type="button" value="搜索" onclick="search()"/></td>
                    <td>&nbsp;</td>
                    </tr>
                </tbody>
           </table>
        <div class="adnr">
            <ul class="adnr2 mar_top">
                <li><a href="#" title="" class="l_blue" onclick="openview(1,800,600)">批量价格修改</a></li>
                <li><a href="#" title="" class="l_blue" onclick="openview(2,800,600)">批量基本信息修改</a></li>
                <li><a href="#" title="" class="l_blue" onclick="openview(3,800,600)">批量备注修改</a></li>
                <li><a href="#" class="l_blue" onclick="del('all')">批量删除</a></li>
                <li><a href="#" class="l_blue" onclick="upstatus('all',1)">显示</a></li>
                <li><a href="#" class="l_blue" onclick="upstatus('all',0)">不显示</a></li>
            </ul>
            <div class="adnr3">
                <div id="showdata">
                    <win:linesList runat="server" ID="linesList1" />
                </div>
            </div>
            <i class="tp"></i><i class="bt"></i>
        </div>
    </div>
   </asp:Content>
   <asp:Content ID="Content3" ContentPlaceHolderID="footcontent" runat="server">
<script type="text/javascript">
    jQuery(document).ready(function () {
        choose("popxg");
    });

    function openview(type, w, h) {
        if (checkedlist('ids').length > 0) {
            if (type == 1) {
                Lightview.show({ href: '../batchupdate_price.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
            if (type == 2) {
                Lightview.show({ href: '../batchupdate_info.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
            if (type == 3) {
                Lightview.show({ href: '../batchupdate_bio.aspx?idlist=' + checkedlist('ids'), rel: 'iframe', options: { width: w, height: h} });
            }
        }
    }
    function reclcik() {
        loading();
        AjaxHelper.Updater('linesList.ascx', 'showdata', 'action=reclick');
    }
    function search() {
        var val = document.getElementById('comp_hidd_luffy').value;
        var status = -1;
        if (document.getElementById('status1').checked) {
            status = 1;
        }
        if (document.getElementById('status2').checked) {
            status = 0;
        }
        if (document.getElementById('status3').checked) {
            status = -1;
        }
        loading();
        AjaxHelper.Updater('linesList.ascx', 'showdata', 'action=search&serstatus=' + status + '&cid=' + val);
    }
    function upstatus(val1, val2) {

        loading();
        if (val1 == 'all') {
            val1 = checkedlist('ids');
        }
        if (val1 != '') {
            AjaxHelper.Updater('linesList.ascx', 'showdata', 'action=upstatus&status=' + val2 + '&parms=' + val1);
        }
    }
    function del(val) {

        if (confirm("该操作不可恢复,您确定要删除吗?")) {
            loading();
            if (val == 'all') {
                val = checkedlist('ids');
            }
            if (val != "") {
                AjaxHelper.Updater('linesList.ascx', 'showdata', 'action=del&parms=' + val + '');
                parent.reclcik();
            }
        } else {
        }
    }
</script>
 </asp:Content>